import { CTX, IViewController, IViewProvider } from '@ibiz-template/runtime';
import { IAppView } from '@ibiz/model-core';
import { ViewPluginController } from './view.controller';

/**
 * 视图适配器
 *
 * @author lxm
 * @date 2022-10-25 18:10:57
 * @export
 * @class ViewProvider
 * @implements {IViewProvider}
 */
export class ViewPluginProvider implements IViewProvider {
  component: string = 'IBizViewPlugin';

  createController(
    model: IAppView,
    context: IContext,
    params?: IParams,
    ctx?: CTX,
  ): IViewController {
    return new ViewPluginController(model, context, params, ctx);
  }
}
